python access class variable by string

36

# name must be a string
# default is optional
getattr(object, name, default)

Comments

Submit
0 Comments